﻿using System;

namespace OrbitOne.Elmah.DAL.Entities
{
    /// <summary>
    /// Represents the XPath belongs to rule entity.
    /// </summary>
    public class XPathBelongsToRuleEntity
    {
        /// <summary>
        /// Gets or Sets the ObjectId of the XPath belongs to rule.
        /// </summary>
        public virtual XPathBelongsToRuleObjectId ObjectId { get; set; }
        /// <summary>
        /// Gets or Sets the Error filter rule that applies to this XPathBelongsToRuleEntity.
        /// </summary>
        public virtual ErrorFilterRuleEntity ErrorFilterRule { get; set; }
        /// <summary>
        /// Gets or Sets the xpath that applies to this XPathBelongsToRuleEntity.
        /// </summary>
        public virtual XPathEntity XPath { get; set; }
    }


    /// <summary>
    /// Represents an XPath belongs to rule Object Id.
    /// </summary>
    public class XPathBelongsToRuleObjectId
    {
        #region Properties
        /// <summary>
        /// Gets or Sets the Error filter rule id.
        /// </summary>
        public Guid ErrorFilterRuleId { get; set; }
        /// <summary>
        /// Gets or Sets the XPath id.
        /// </summary>
        public Int32 XPathId { get; set; } 
        #endregion

        #region Constructor
        /// <summary>
        /// Creates a new instance of the xpath belongs to rule object id.
        /// </summary>
        /// <param name="errorFilterRuleId"></param>
        /// <param name="xPathId"></param>
        public XPathBelongsToRuleObjectId(Guid errorFilterRuleId, Int32 xPathId)
        {
            this.ErrorFilterRuleId = errorFilterRuleId;
            this.XPathId = xPathId;
        } 
        #endregion
    }
}
